const pageModules: Recordable<() => Promise<Recordable>> = import.meta.glob(
  ['@/pages/**/index.vue', '!@/pages/**/components/**/index.vue'],
  {
    eager: false,
  },
);

const pages: Recordable<() => Promise<Recordable>> = {};
for (const key of keys(pageModules)) {
  const name = key.replace('/src/pages', '').replace(/\/index\.(vue)/, '');
  pages[name] = pageModules[key];
}

export default pages;
